package appconfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type AppConfig struct {
	InitMysql
}
type InitMysql struct {
	Hort     string
	User     string
	Pass     string
	Part     int
	Database string
}

var AppCon AppConfig

func AppInit() {
	viper.SetConfigFile("./appconfig/test.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppCon)
	fmt.Println("动态配置文件成功", AppCon)
}
